fix: correctly assign targetVersion for parent-update targets - #1121
fix: correctly assign targetVersion for parent-update targets#1121RohithPariki wants to merge 4 commits into
Conversation
|
Thanks for this, and apologies for the slow response. This overlaps with #1113, which @osfv opened two days earlier and which fixes the same issue from a different angle. Under the first-working-PR-wins rule that one has the claim, so I want to be straight that this PR will not merge as it stands. But it is not wasted work, and I would rather explain why than just close it. #1113 fixes the structure. The root cause is that a parent-update target and a direct finding on the same parent collide in a map keyed by package name, and it rekeys that map. What it does not fix is So what I would like, if you are up for it: once #1113 lands, rebase this on top with just the One thing to settle first, and it is my call rather than yours. For Also, |
Fixes OWASP#1007. Assigns the parent's currentVersion instead of the child's targetChildVersion to the parent-update target, preventing incorrect version merging for direct dependencies.
6d9d87f to
9bcc543
Compare
What changed and why
The
targetVersionforparent-updatewas being incorrectly populated with the child dependency's safe version (targetChildVersion). During map insertion, if the parent was also flagged as a direct finding, its correcttargetVersioncould be overwritten by this incorrect child version due to version comparison sorting, resulting in cross-wired suggested commands.This assigns
currentVersiontotargetVersionforparent-updatetargets, preventing incorrect version merging while correctly indicating no direct version change is needed in the UI.Closes #1007